<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * Verification Controller
 *
 * @package     VisualQ Local System
 * @author      CSU OJT Students '10 - '11 (Michael Roland B. Martin)
 * @copyright   Copyright (c) 2010 - 2011, Bitstop Network Services, Inc.
 * @version     1.0 January 27, 2011
 */

class Verification extends Controller {

    function Verification()
    {
        parent::Controller();
        $this->load->database();

        $this->lang->load('local', 'English');
        $this->load->model('settings_model');
    }

    function index()
    {
        // Check if necessary data has been initialized
        if($this->settings_model->check_settings() &&
                $this->settings_model->check_services() &&
                $this->settings_model->check_accounts() &&
                $this->settings_model->check_accounts_services())
        {
            redirect(base_url() . 'login/');
        }

        $this->load->view('verification_view');
    }

    /**
     * Show 'setup complete' page
     */
    function done()
    {
        // Get Server IP
        $ip = gethostbynamel('');
        $data['ip'] = $ip[0];

        $this->load->view('post_install_view', $data);
    }

}

/* End of file verification.php */
/* Location: ./system/application/controllers/verification.php */